package ui.activity.wallet.biz;

import base.BaseBiz;
import base.BaseResp;
import coom.BaseSubscribe;
import coom.RetrofitHelp;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import ui.model.RewardsTrainTopBean;

/**
 * Created by chenjian on 19/2/26.
 * 1
 */

public class RewardsDetailsOtherBiz extends BaseBiz {

    /**
     * 详情列表
     */
    public void getListInfo(int type, int current, int size,int year,int month,  final Callback<RewardsTrainTopBean> callback) {
        com.add(RetrofitHelp.getSecretApi().rewardsOtherList(type, current, size,year,month)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new BaseSubscribe<BaseResp<RewardsTrainTopBean>>() {

                    @Override
                    public void onSuccess(Object obj) {
                        callback.onSuccess((RewardsTrainTopBean) obj);
                    }

                    @Override
                    public void onFailure(Object obj) {
                        callback.onFailure((RewardsTrainTopBean) obj);
                    }
                })
        );
    }

}
